/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package verins.beans;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author yi
 */
@Embeddable
public class UbigeoxprocesoelectoralPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idprocesoelectoral", nullable = false)
    private int idprocesoelectoral;
    @Basic(optional = false)
    @Column(name = "idubigeo", nullable = false, length = 6)
    private String idubigeo;

    public UbigeoxprocesoelectoralPK() {
    }

    public UbigeoxprocesoelectoralPK(int idprocesoelectoral, String idubigeo) {
        this.idprocesoelectoral = idprocesoelectoral;
        this.idubigeo = idubigeo;
    }

    public int getIdprocesoelectoral() {
        return idprocesoelectoral;
    }

    public void setIdprocesoelectoral(int idprocesoelectoral) {
        this.idprocesoelectoral = idprocesoelectoral;
    }

    public String getIdubigeo() {
        return idubigeo;
    }

    public void setIdubigeo(String idubigeo) {
        this.idubigeo = idubigeo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idprocesoelectoral;
        hash += (idubigeo != null ? idubigeo.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof UbigeoxprocesoelectoralPK)) {
            return false;
        }
        UbigeoxprocesoelectoralPK other = (UbigeoxprocesoelectoralPK) object;
        if (this.idprocesoelectoral != other.idprocesoelectoral) {
            return false;
        }
        if ((this.idubigeo == null && other.idubigeo != null) || (this.idubigeo != null && !this.idubigeo.equals(other.idubigeo))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "verins.beans.UbigeoxprocesoelectoralPK[ idprocesoelectoral=" + idprocesoelectoral + ", idubigeo=" + idubigeo + " ]";
    }
    
}
